package auction.dao;

import auction.entity.Auction;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AuctionDao {
    //分页查询
    List<Auction> selectByPage(Map<String, Integer> parameters);

    //获取总个数
    Integer getTotalCount();

    //条件查询
    List<Auction> selectByCondition(@Param("auction")Auction auction, @Param("parameters") Map<String, Integer> parameters);

    //根据id来查
    Auction selectAuctionById(Integer id);

    //删除根据商品id
    Integer deleteAuctionById(Integer id);

    //修改根据上商品id
    Integer updateAuctionById(Auction auction);

    //发布商品
    Integer addAuction(Auction auction);

    //查询拍卖结束的商品
    List<Auction> slelectEndAuctions();
    //查询拍卖中的商品
    List<Auction> slelectLiveAuctions();

}
